//
// Created by v on 19-5-30.
//

#include "DisplayNormal.h"

DisplayNormal::DisplayNormal(int width, int height, QWidget *parent) {
    setParent(parent);
    resize(width, height);
    m_label = new QLabel(this);
    m_label->setGeometry(50, 30, 200, 100);
//    QFont font;
//    font.setPointSize(16);
//    m_label->setFont(font);
    m_label->setText("This is just a test");
    m_label->setAlignment(Qt::AlignCenter);
    m_label->setStyleSheet("background-color: red");
}

DisplayNormal::~DisplayNormal() {
    delete m_label;
}

int DisplayNormal::showImg(QImage &img) {

    m_label->setPixmap(QPixmap::fromImage(img));
    return 0;
}